package com.lizhi.yun.core.controller;

import com.lizhi.common.yun.entity.ListResponseResult;
import com.lizhi.yun.core.handler.ServiceJlcTreatrecordHandlerNew;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Author: lizhi
 * @Description:
 * @Date: create in 2020/11/4 9:33
 */
@RefreshScope
@RestController
@RequestMapping(path = "/api/jlc/yun/treatrecord")
@Api("经颅磁治疗信息")
public class ServiceJlcTreaTrecordController {

    @Resource
    private ServiceJlcTreatrecordHandlerNew jlcTreatrecordHandler;


    @ApiOperation("通过map查询患者治疗信息")
    @PostMapping(path = "/doMain")
    public ListResponseResult doMain(@RequestParam Map<String, Object> map){
        return jlcTreatrecordHandler.doMain(map);
    }

    @ApiOperation("通过id查询患者治疗信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "hospitalid", value = "医院id", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "hospitalsystemid", value = "系统id", required = true, dataType = "String", paramType = "query")
    })
    @PostMapping(path = "/selectById")
    public ListResponseResult selectById(String id, String hospitalid, String hospitalsystemid){
        return jlcTreatrecordHandler.selectById(id, hospitalid, hospitalsystemid);
    }
}
